import request from '@/config/axios'

// 系统职称 VO
export interface ProfessionalTitleVO {
  id: number // 职称ID
  tieName: string // 职称名称
  tieLevel: number // 职称等级
  tieType: string // 职称类型
  remarks: string // 备注信息
}

// 系统职称 API
export const ProfessionalTitleApi = {
  // 查询系统职称分页
  getProfessionalTitlePage: async (params: any) => {
    return await request.get({ url: `/pm/professional-title/page`, params })
  },

  // 查询系统职称详情
  getProfessionalTitle: async (id: number) => {
    return await request.get({ url: `/pm/professional-title/get?id=` + id })
  },

  // 新增系统职称
  createProfessionalTitle: async (data: ProfessionalTitleVO) => {
    return await request.post({ url: `/pm/professional-title/create`, data })
  },

  // 修改系统职称
  updateProfessionalTitle: async (data: ProfessionalTitleVO) => {
    return await request.put({ url: `/pm/professional-title/update`, data })
  },

  // 删除系统职称
  deleteProfessionalTitle: async (id: number) => {
    return await request.delete({ url: `/pm/professional-title/delete?id=` + id })
  },

  // 导出系统职称 Excel
  exportProfessionalTitle: async (params) => {
    return await request.download({ url: `/pm/professional-title/export-excel`, params })
  },
}